package com.xyf.sys.mapper;

import com.xyf.sys.domain.User;
import com.xyf.sys.vo.UserListRequestVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author
 * @Date 2024/1/231017
 * @Description
 */
@Repository
@Mapper
public interface UserMapper {

    int deleteByPrimaryKey(String id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByOpenid(@Param("openid") String openid);

    List<User> selectNearbyRegimentList(@Param("longitude") BigDecimal longitude, @Param("latitude") BigDecimal latitude);

    List<User> selectByDeptIdNearbyRegimentList(@Param("deptId") Long deptId, @Param("longitude") BigDecimal longitude, @Param("latitude") BigDecimal latitude);

    List<User> selectUserList(@Param("userId") String userId, @Param("keyword") String keyword, @Param("roleId") Long roleId);

    List<User> selectUserList2(@Param("keyword") String keyword, @Param("userType") Boolean userType);

    List<User> list();

    User selectByShortId(@Param("shortId") String shortId);

    User selectByMobile(@Param("mobile") String mobile, @Param("appid") String appid);

    User selectByUnionidAndAppid(@Param("unionid") String unionid, @Param("appid")String appid);

    List<User> selectDeptUserList(UserListRequestVo map);

    List<User> findList();

    List<User> findUserList();

    void updateUserDept(User user);

    List<User> selectRoleUser(@Param("roleKey") String roleKey);

    List<User> selectByAppidAndDeptId(@Param("appid") String appid, @Param("deptId") Long deptId);
}
